<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<form action=/mycal method='post'>
    <input type='text' name="x" value="{{x}}">
    <select name='op'>
        <option value="add" {%if op == "add" %}selected{%endif%}> +加</option>
        <option value="sub" {%if op == "sub" %}selected{%endif%}>-减</option>
        <option value="mul" {%if op == "mul" %}selected{%endif%}> *乘乘</option>
        <option value="div" {%if op == "div" %}selected{%endif%}>/除</option>
    </select>
    <input type='text' name="y" value="{{y}}"> = <span>{{res}}</span>
    <div>
        <input type="submit" value='开始计算'>
    </div>

</form>
</body>
</html>